GXContainsRectangle
You can use theGXContainsRectangle
function to determine if one rectangle contains another.
gxBoolean GXContainsRectangle(const gxRectangle *container, const gxRectangle *test);
container
- A pointer to the rectangle to test as the container.
test
- A pointer to the rectangle to test for inclusion.
- function result
- A Boolean value indicating whether the container rectangle contains
the test rectangle.DESCRIPTION
TheGXContainsRectangle
function returnstrue
as its function result if the rectangle specified by thetest
parameter lies within the rectangle specified by thetarget
parameter, andfalse
otherwise.This function may return
true
even if the container and test rectangles share one or more edges. This function returnstrue
when the container and test rectangles are defined by the same coordinates.Notice that the parameters to this function are not shapes; they are pointers to
gxRectangle
structures.ERRORS, WARNINGS, AND NOTICES
Errors parameter_is_nil SEE ALSO
For a discussion of thegxRectangle
data structure, see Chapter 2, "Geometric Shapes," in this book.To determine if a rectangle touches a point, use the
GXTouchesRectanglePoint
function, described on page 4-96.To determine if a rectangle contains a shape, use the
GXContainsBoundsShape
function, described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help